<!DOCTYPE html>
<html>

	<head>
		<title>我的消息</title>
		<meta charset="utf-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
		<link rel="stylesheet" href="/js/bootstrap/css/bootstrap.css">
		<script src="/js/jquery/jquery.min.js"></script>
		<script src="/js/bootstrap/js/bootstrap.js"></script>
		<script src="/js/plugins/jrender/jrender.js"></script>
		<link rel="stylesheet" href="/css/font/css/font-awesome.min.css" />
		<link rel="stylesheet" href="/css/reset.css" />
		<link rel="stylesheet" href="/css/message.css" />
		<script>
			$(function () {
                // 获取我的消息
                // 获取sessionStorage中的用户信息
                var user = JSON.parse(sessionStorage.getItem("user"));
                $.get("/users/" + user.id + "/collectsCount",{type:"travel"}, function (data) {
                    $("#info .travelConut").renderValues(data);
                });
                $.get("/users/" + user.id + "/collectsCount",{type:"strategy"}, function (data) {
                    $("#info .strategyCount").renderValues(data);
                });
                $.get("/users/" + user.id + "/collectsCount",{type:"hotel"}, function (data) {
                    $("#info .hotelCount").renderValues(data);
                });
                $.get("/users/" + user.id + "/collectsCount",{type:"news"}, function (data) {
                    $("#info .newCount").renderValues(data);
                });

            });
		</script>
	</head>

	<body>
		<div class="search-head">
			<div class="row nav-search">
				<div class="col">
					<a href="javascript:history.go(-1);">
						<span><i class="fa fa-chevron-left" ></i></span>
					</a>
				</div>
				<div class="col">
					<span>我的收藏列表</span>
				</div>
				<div class="col"></div>
			</div>
		</div>

		<ul class="list-group" id="info">
			<a href="/mine/travelCollect.html">
				<li class="list-group-item d-flex justify-content-between align-items-center">
					<div class="item">
						<span><i class="fa fa-star fa-2x" ></i></span>
						<span>对游记的收藏</span>
						<span class="badge badge-danger badge-pill travelConut" render-html="data">0</span>
					</div>
					<i class="fa fa-chevron-right"></i>
				</li>
			</a>
			<a href="/mine/newsCollect.html">
				<li class="list-group-item d-flex justify-content-between align-items-center">
					<div class="item">
						<span><i class="fa fa-star fa-2x" ></i></span>
						<span>对日报的收藏</span>
						<span class="badge badge-danger badge-pill newCount" render-html="data">0</span>
					</div>
					<i class="fa fa-chevron-right"></i>
				</li>
			</a>
			<a href="/mine/hotelCollect.html">
				<li class="list-group-item d-flex justify-content-between align-items-center">
					<div class="item">
						<span><i class="fa fa-star fa-2x" ></i>	</span>
						<span>对酒店的收藏</span>
						<span class="badge badge-danger badge-pill hotelCount" render-html="data">0</span>
					</div>
					<i class="fa fa-chevron-right"></i>
				</li>
			</a>
			<a href="/mine/strategyCollect.html">
				<li class="list-group-item d-flex justify-content-between align-items-center">
					<div class="item">
						<span><i class="fa fa-star fa-2x" ></i></span>
						<span>对攻略的收藏</span>
						<span class="badge badge-danger badge-pill strategyCount" render-html="data">0</span>
					</div>
					<i class="fa fa-chevron-right"></i>
				</li>
			</a>
		</ul>

	</body>

</html>